package com.dj.product.k2faas.dto.function;

import com.dj.product.k2faas.entity.function.Function;
import com.dj.product.k2faas.entity.function.config.AbstractFunctionConfig;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * Created by 丁建 on 2025/9/23 16:48
 *
 * @author 丁建
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@Accessors(chain = true)
public abstract class AbstractFunctionRequest {

    private Long cloudId;

    @NotBlank(message = "方法名不能为空")
    private String name;

    private String description;

    @NotBlank(message = "方法体不能为空")
    private String content;

    @NotNull(message = "方法类型不能为空")
    private Function.FunctionType functionType;

    @NotNull(message = "方法配置不能为空")
    private AbstractFunctionConfig config;

}
